import { request } from 'umi';

export const getLiveClients = (server: string) => {
  return request<{ [key: string]: any }>(`${server}/live`);
};

export const createLive = (server: string, data: any) => {
  return request<any>(`${server}/live`, {
    method: 'post',
    data,
  });
};

export const deleteLive = (server: string, peerId: string) => {
  return request<any>(`${server}/live`, {
    method: 'delete',
    params: { peerId },
  });
};
